Matrix improvements to lossless encoding and decoding

ABSTRACT

A lossless encoder and decoder are provided for transmitting a multichannel signal on a medium such as DVD-Audio. The encoder accepts additionally a downmix specification and splits the encoded stream into two substreams, such that a two-channel decoder of meagre computational power can implement the downmix specification by decoding one substream, while a multichannel decoder can decode the original multichannel signal losslessly using both substreams. Further features provide for efficient implementation on 24-bit processors, for confirmation of lossless reproduction to the user, and for benign behaviour in the case of downmix specifications that result in overload. The principle is also extended to mixed-rate signals, where for example some input channels are sampled at 48 kHz and some are sampled at 96 kHz

FIELD OF INVENTION

[0001] The invention relates to the encoding and decoding of digitalsignal streams, particularly digital audio streams, with reference tomatrixing multichannel signals.

BACKGROUND TO THE INVENTION

[0002] Lossless compression is now an established means of reducing thedata rate required for storing or transmitting a digital audio signal.One method of reducing the data rate of a multichannel signal is toapply matrixing so that dominant information is concentrated in some ofthe transmitted channels while the other channels carry relativelylittle information. For example, two-channel audio may have nearly thesame waveform in the left and right channels if conveying a centralsound image, in which case it is more efficient to encode the sum anddifference of the two channels. This process is described in some detailin WO-A 96/37048, including the use of a cascade of ‘primitive matrixquantisers’ to achieve the matrixing in a perfectly invertible orlossless manner.

[0003] The process disclosed in WO-A 96/37048 also envisages the use ofmatrix quantisers to apply a matrix to a multichannel original digitalsignal in order to derive matrixed digital signals representing speakerfeeds more suitable for general domestic listening. These matrixedsignals may be recorded on a carrier such as a DVD, and the ordinaryplayer will simply feed each matrixed signal to a loudspeaker. Theadvanced player, however, may invert the effect of the matrix quantisersand thus reconstruct the original digital signal exactly in order toreproduce it in an alternative manner.

[0004] In a commercial application of DVD-Audio there is a requirementto combine the above two concepts so that a transmission system usinglossless compression may also provide both a matrixed signal and anoriginal signal. In this application the required matrixed signal hastwo channels whereas the original signal has more than two channels,thus additional information must be provided to allow the multichannelsignal to be recovered; however, the additional information should notimpose a computational overhead for decoders that wish to decode thetwo-channel matrixed signal only.

[0005] Currently, digital audio is often transmitted with 24 bits, andpopular Digital Signal Processing (DSP) chips designed for audio such asthe Motorola 56000 series also easily handle a 24-bit word. However theprocessing described in WO-A 96/37048 can generate numbers requiring aword width greater than the original signal. Because the use of‘double-precision’ computation is prohibitively expensive, a method isneeded to allow the processing to be substantially carried out while notrequiring an increased word width.

[0006] Finally the consumer, having bought equipment designed to providelossless reproduction, would like reassurance that the signal recoveredis indeed lossless. Conventional parity and CRC checks within theencoded stream will show errors due to data corruption within thestream, but they will not expose errors due to matrixing or otheralgorithmic mismatch between an encoder and a decoder.

SUMMARY OF THE INVENTION

[0007] According to a first aspect of the invention, there is provided astream divided into two substreams, the first substream providinginformation relating to a ‘downmix’ signal obtained by matrixing andcontaining fewer channels than an original multichannel digital signal,and the second substream providing additional information allowing theoriginal multichannel digital signal to be losslessly recovered by adecoder. In the context where both substreams are conveyed usinglossless compression, a decoder that decodes only the downmix signalneeds to decompress the first substream only and can therefore use fewercomputational resources than are required to decode the multichanneldigital signal.

[0008] In a variant of this first aspect, the first substream may bereplaced by a plurality of substreams. allowing a plurality of differentmatrixed presentations to be selected. Again however, the last substreamwill contain additional information that allows a complete originalmultichannel digital signal to be reproduced losslessly.

[0009] In a preferred implementation of the first aspect an encoderfurnishes the downmix signal using a cascade of one or more primitivematrix quantisers, each of which implements an n by n matrix, followedby selection of the m channels required for the downmix.

[0010] A multichannel decoder will take the signals from both substreamsand apply a cascade of inverse primitive matrices in order to recoverthe original multichannel signal. It might be considered natural toorder the channels that are input to the decoder's cascade so that thechannels from the first substream are placed at the beginning. Howeverthis may result in incorrect channel ordering at the output of thedecoder's cascade, so preferably a channel permutation is specified bythe encoder and implemented by the decoder to recover the correctchannel order.

[0011] Preferably, any truncation or rounding within the matrixingshould be computed using dither. In this case, for lossless coding, thedither signal must be made available to the decoder in order that it mayinvert the computations performed by the encoder and thus recover theoriginal signal losslessly. The dither may be computed using an‘autodither’ method as envisaged in WO-A 96/37048; but in the context ofa lossless compression scheme, autodither can be avoided by providing adither seed in the encoded stream that allows a decoder to synchronizeits dithering process to that which was used by the encoder.

[0012] Therefore according to a second aspect of the invention, there isprovided a lossless compression system including a dither seed in theencoded bitstream. The dither seed is used to synchronise apseudo-random sequence generator in the decoder with a functionallyidentical generator in an encoder.

[0013] In an important application of the invention, the downmix has twochannels, and is most conveniently derived by the application of twoprimitive matrix quantisers to the original multichannel digital signal.In embodiments that implement the second aspect of the invention, ditheris required by each quantiser; moreover different dither should beprovided for the two quantisers and the preferred probabilitydistribution function (PDF) for each dither is triangular. An efficientway to furnish two such triangular PDF (TPDF) dither signals, which isreferred to herein as ‘diamond dither’, is to add and subtract twoindependent rectangular PDF (RPDF) signals. For further details andgeneralisation to more channels, see R. Wannamaker, “EfficientGeneration of Multichannel Dither Signals”, AES 103rd Convention, NewYork, 1997, preprint no. 4533.

[0014] Accordingly, in a preferred implementation of the second aspect,the encoder uses a single sequence generator to furnish two independentRPDF dither signals, and the sum and difference of these signals is usedto provide the dither required by two primitive matrix quantisers usedto derive a two-channel downmix.

[0015] WO-A 96/37048 describes the use of primitive matrix quantiserswithin a lossless compression system. and above we have referred to apreferred implementation of the first aspect, which also uses primitivematrix quantisers in order to place the information required for a‘downmix’ signal into a separate substream.

[0016] Accordingly, in a third aspect of the invention there areprovided encoders and decoders containing uncommitted primitive matrixquantisers, the encoder having logic that accepts a downmix specified asa matrix of coefficients, allocates a number of primitive matrixquantisers to furnish the downmix and optionally allocates a furthernumber to provide matrixing to reduce the data rate. The encoderfurnishes a stream containing specifications of the primitive matrixquantisers to be used, and optionally may include the addition ofdither. In a preferred implementation, the dither is generated as twoRPDF dither sequences, and the encoder specifies a coefficient for eachdither sequence. Diamond dither is thus obtainable by specifying twocoefficients of the same sign in the case of a first primitive matrixquantiser, and two coefficients of opposite sign in the case of a secondprimitive matrix quantiser.

[0017] In an elementary implementation of the third aspect, theprimitive matrices are chosen so that the downmix signals aretransmitted directly in the first substream. However, this may not beoptimal for several reasons. Considering the n channels of amultichannel subspace as defining an n-dimensional vector space, thesignals that result in a nonzero output in a linear downmix will form asubspace. If the downmix has m-channels then the subspace will usuallyalso be of dimension m. The signals in the first substream should thenconvey the m-dimensional subspace optimally, which may require itstransmitted channels to be a matrixed representation of the downmixchannels. Thus matrixing facilities are usually needed even by a decoderdesigned to recover a downmix signal only.

[0018] Audio signals are normally conveyed using at most 24 bits, and ina lossless reproduction system such as Meridian Lossless Packing® (MLP),it is guaranteed that the output will not exceed 24 bits because theoriginal input did not exceed 24 bits. A description of MLP may beobtained from DVD Specifications for Read-Only Disc, Part 4: AudioSpecifications, Packed PCM, MLP Reference Information, Version 1.0. Mar.1999, and from WO-A 96/37048. In the case of the downmix, the outputlevel is defined by the matrix in the decoder. In principle one couldscale the matrix coefficients so that the output can never exceed thesaturation threshold defined by a 24-bit word, but in practice thisresults in unacceptably low output level. Moreover it is not acceptablefor the encoder to limit or clip the downmix signals, as this cannot bedone without affecting the reconstructed multichannel signal which wouldthen not be lossless. An output level that exceeds the saturationthreshold is referred to herein as ‘overload’. Occasional overload ofthe downmix signal is considered acceptable. except that digitaloverload, if allowed to ‘wrap-round’, is extremely objectionable. Theconsequence of wrap-round is discussed below in more detail. Thereforein a preferred implementation of the first aspect of the invention, adecoder that decodes a downmix signal has clipping or similar limitingfacilities after the computation of the matrix so that the effects ofoverload are not objectionable.

[0019] Another consequence of the 24-bit tradition in high quality audiois the availability of DSP processing chips having a 24-bit internalword width. Each primitive matrix quantiser as disclosed in WO-A96/37048 modifies one channel of a multichannel signal by addingproportions of the other channels. Such a primitive matrix quantiser hasa straight-through gain of unity. The invention in a fourth aspectprovides for a primitive matrix quantiser that accepts a gaincoefficient for the modified channel, and has an additional data pathknown as lsb_bypass. The gain may be set to a value less than unity inorder to avoid overload. The quantised output of the primitive matrixquantiser will then contain less information than its input, with theremaining information being contained in additional least significantbits (LSBs) that are generated by application of the gain coefficient.Some or all of these LSBs are then transmitted separately through thelsb_bypass data path. In particular, in the case of a gain coefficientof ±½, a single LSB is generated that can be conveyed through thelsh_bypass.

[0020] In a fifth aspect of the invention that provides a‘lossless_check’ feature, a check value is computed on the multichannelinput to the encoder and is conveyed in the encoded stream. The decodercomputes a similar check value from the decoded output and compares itwith the check value conveyed within the stream. typically to provide avisual indication such as a ‘Lossless’ light to the listener that thereproduction is truly lossless. In the case of a stream with a downmixaccording to the first aspect of the invention, the downmix is not alossless reproduction of an original signal. Nevertheless, if asynchronised dither is provided in the decoder according to the secondaspect, and if the decoder matrixing is precisely described such as, forexample, the matrix quantisers according to the third aspect of theinvention, then the downmix reproduction is completely deterministic andcan be simulated in the encoder and auditioned by a mastering engineeror producer. Therefore the encoder can compute a check value on thesimulated downmix and this word can be checked by the decoder, thusconfirming lossless reproduction of the same downmix that was auditionedor available for audition in the encoding process.

[0021] An encoder that incorporates for example, the ‘prequantiser’described in P. G. Craven and J. R. Stuart, ‘Cascendable Lossy DataCompression Using a Lossless Kernel’, J. Audio Elig. Soc., Abstracts,Mar. 1997, vol. 45, no. 5, p. 404, preprint no. 4416, referred to hereinas ‘AES 1997’, and which can therefore alter the original multichannelsignal before encoding, has a choice on the computation of the checkvalue. If it computes the check value from the original signal, anindication of lossless reproduction such as the ‘Lossless light’ on adecoder will not illuminate during passages that have been altered. Analternative is to make the altered signal available for audition as partof the encoding process, and to compute the check value from the alteredsignal. This is consistent with the downmix case: in both situations theLossless light indicates lossless reproduction of a signal that wasavailable for audition at the encoding stage.

[0022] In a preferred implementation, the check value is a parity-checkword that is computed on all the channels. In an embodimentincorporating the first aspect of the invention, the first substreamcontains a parity-check word that is computed from the simulated downmixbefore any modification such as clipping is applied to avoid overload,while the second substream contains a parity-check word computed fromthe complete multichannel signal. Before computing the parity, the wordrepresenting each channel value is rotated by a number of bits equal tothe channel number so that an error affecting two channels identicallyhas a high probability of being detected.

[0023] Throughout this disclosure, more particular reference is made toencoding processes that record an encoded stream onto storage media suchas DVD, and to decoding processes that retrieve the encoded stream fromsuch storage media. It should be understood, however, that encodersimplemented according to the invention may be used to send encodedstreams using essentially any transmission media including baseband ormodulated communication paths throughout the spectrum from supersonic toultraviolet frequencies, or may be used to record encoded streams ontostorage media using essentially any recording technology includingmagnetic and optical techniques. Similarly, decoders implementedaccording to the invention may be used to process encoded streamsobtained from such media.

BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Examples of the present invention will now be described withreference to the accompanying drawings, in which:

[0025]FIG. 1 shows an overview of a lossless six channel encodercomprising a matrix that is used to encode the matrixed channels intotwo substreams, which are then packaged into a single stream andrecorded on DVD.

[0026]FIG. 2 shows a multichannel decoder decoding the two substreamsproduced by the encoder of FIG. 1 to furnish a lossless reconstructionof the original six channels.

[0027]FIG. 3 shows a two-channel decoder decoding the first substreamonly to furnish a two channel downmix.

[0028]FIG. 4a shows a cascade of two primitive matrix quantisersmodifying two channels of a four channel signals.

[0029]FIG. 4b shows a similar cascade of two primitive matrixquantisers, configured to invert the processing of FIG. 4a.

[0030]FIG. 5a shows a primitive matrix quantiser incorporating dither.

[0031]FIG. 5b shows an inverse primitive matrix quantiser incorporatingdither.

[0032]FIG. 6a shows a primitive matrix quantiser modified to provide the‘LSB bypass’ facility, and the separate transmission of the bypassed inthe case of any further lossless processing.

[0033]FIG. 6b is complementary to FIG. 6a, showing the separatetransmission of the bypassed LSB in the case of any inverse losslessprocessing, and a primitive matrix quantiser that integrates thebypassed LSB and reconstitutes the original signal.

[0034]FIG. 7a shows a block diagram of part of one embodiment of an MLPencoder with LSB bypass.

[0035]FIG. 7b shows one embodiment of a decoder that is complementary tothe encoder of FIG. 7a.

[0036]FIG. 8 shows a primitive matrix quantiser that is specified foruse in one embodiment of an MLP decoder.

[0037]FIG. 9 shows a lossless encoder preceded by a prequantiser with anoutput for audition, and a ‘Lossless Check’ value computed from theprequantised output.

[0038]FIG. 10 shows an apparatus for encoding mixed-rate signal samplesat 48 kHz and 96 kHz, comprising a lossless encoder preceded by anupsampler.

DETAILED DESCRIPTION OF THE INVENTION Downmix Encoding and Decoding

[0039] The article “Lossless Coding for Audio Discs”, J. Audio Eng.Soc., Sep. 1996, vol. 44, no. 9, pp. 706-720 and international patentapplication WO-A 96/37048 contain discussions of some of the principlesused in lossless compression.

[0040] An important commercial application of lossless compression is onDVD-Audio, where there are two classes of player: the multichannelplayer furnishing 6 outputs used typically to drive a ‘5.1 ’ speakerlayout, and the two channel player furnishing two outputs for listenerswith two loudspeakers or for portable use with headphones.

[0041] Therefore, DVD-Audio has the capability to carry a recorded audiosignal twice, once as a multichannel signal and again as a two-channelsignal. However, carrying the signal twice has adverse implications forplaying time. In many cases the original recording is presented as amultichannel signal only, and the two channel listener is given adownmix derived from the multichannel master.

[0042] If the recorded audio is carried as conventional Pulse CodeModulation (PCM) samples, the disc may advantageously carry themultichannel recording plus downmix coefficients that allow the playerto derive a two channel downmix as a linear combination of the channelsof the multichannel signals. For example a downmix consisting of the twochannels L₀ and R₀ could be computed from a multichannel signalcontaining left-front, right-front, left-surround, right-surround,centre and low-frequency-effects channels, which are denoted L_(f),R_(f), L_(s), R_(s), C and L_(fe), respectively, using the matrixequation: $\begin{bmatrix}L_{0} \\R_{0}\end{bmatrix} = {\begin{bmatrix}{.75} & 0 & {.739200} & {- {.126825}} & {- {.5}} & {.5} \\0 & {.75} & {- {.126825}} & {.739200} & {- {.5}} & {.5}\end{bmatrix}\begin{bmatrix}L_{f} \\R_{f} \\L_{s} \\R_{s} \\C \\L_{fe}\end{bmatrix}}$

[0043] The computation of the downmix within the player is however lessattractive when lossless compression is used. All six channels of themultichannel signal must be decoded before the above matrix equationcould be applied, and the computational overhead of decoding sixchannels is excessive in this context.

[0044] An example of a solution to this problem is shown in FIGS. 1, 2and 3 . In FIG. 1, the multichannel signal presented to the encoder isfed to ‘Matrix 1’, in this case a 6×6 matrix, whose outputs M₀ . . . M₅are partitioned into the two subsets {m₀, m₁} and {m₂, m₃, m₄, m₅}.These subsets are then encoded by ‘Encoder core 0’ and ‘Encoder core 1’into two separate substreams, designated ‘substream 0’ and ‘substream1’. Each substream is then fed through a FIFO buffer and the substreamsare combined in the ‘packetiser’ to produce a composite output streamwhich may be on a medium such as a DVD, as shown in the figure. Thereason for using a FIFO buffer is discussed in U.S. Pat. No. 6,023,233,and is illustrated in M. A. Gerzon, P. G. Craven, J. R. Stuart, M. J.Law and R. J. Wilson “The MLP Lossless Compression System” presented atthe AES 17th International Conference on High Quality Audio Coding,Florence, Sep. 1998, referred to herein as ‘AES 1998’.

[0045] To play the multichannel signal encoded by the encoder shown inFIG. 1, a decoder such as that shown in FIG. 2 is used. In this decoder,a ‘de-packetiser’ receives an encoded stream from a transmission mediumor storage medium such as a DVD, as shown, parses the encoded stream andseparates it into two substreams. Each substream is passed through aFIFO buffer and a ‘decoder core’ in order to furnish the signals m₀ . .. m₅. These signals are then passed through the inverse of Matrix 1 inorder to furnish the original multichannel signal.

[0046] To play a two channel downmix a decoder such as that shown inFIG. 3 is used. Here the substreams are separated but only substream 0is retained, buffered and decoded to furnish signals m₀ and m₁. Fromthese the matrix Matrix 0 derives the desired signals L₀ and R₀,assuming that the encoder has placed the correct information in m₁ andm₁, for this to be possible. For example, if the top two rows of Matrix1 in the encoder of FIG. 1 contain downmix coefficients such as those inthe 2×6 matrix shown above, the signals m₀ and m₁ will be the requireddownmix signals L₀ and R₀. In this case ‘Matrix 0’ in FIG. 3 isredundant and can either be replaced by the identity matrix or omitted.

[0047] A distinguishing feature of the present invention is that it maybe lossless throughout, so that the multichannel output signal obtainedfrom the decoder of FIG. 2 is bit-for-bit identical to the input signalprovided to the encoder of FIG. 1. Thus, the encoder and decoder cores,if present, must be lossless, and Matrix 1 and its inverse are alsorequired to be lossless. The lossless encoder and decoder cores may beimplemented in essentially any manner that provides for lossless codingbut, in preferred embodiments, these processes are implemented accordingto the processes that are disclosed in WO-A 96/37048. Considerations forimplementing Matrix 1 are discussed below in more detail.

[0048] This distinguishing feature of lossless coding allows a DVD orother medium to convey an encoded stream in a form that allows losslessrecovery of an original multichannel signal and also allows simplerecovery of a matrixed representation or downmix of the original signalusing essentially the same storage space or bandwidth that wouldotherwise be required to convey only the original multichannel signal.In practical embodiments, the required storage space or bandwidth of alosslessly compressed signal incorporating a downmix may be veryslightly higher than that required by the compressed multichannel signalalone due to the additional information conveyed in the encoded streamthat is needed by the decoder to reverse the downmix and due to the factthe PMQs that are used to encode the downmix are not available for useto optimise the coding process.

[0049] One method of performing the matrixing losslessly is by using acascade of primitive matrix quantisers (PMQs), which are disclosed as‘primitive matrices’ in WO-A 96/37048. These PMQs are matrices that areused to modify the signal in one channel, using signal values obtainedfrom other channels, in a manner that is invertible. In particular, WO-A96/37048 discloses how lossless inverse matrixing may be performed byinserting the effect of each quantiser in reverse order. This isillustrated in FIG. 4a, showing two PMQs in cascade for use in anencoder, and FIG. 4b showing the two inverse PMQs in reverse order. Insimple situations where there are, in particular, only two primitivematrix quantisers, then the signals S1, S2,S3 and S4 can be identifiedwith original channels such as L_(f), R_(f), L_(s), R_(s), etc., and themodified signals S1′ and S2′ can be identified with L₀ and R₀, or withsignals m₀ and m₁.

[0050] To verify bit-for-bit reconstruction of the original signal,observe that the quantiser Q₂ in FIG. 4b is fed with the same signal asthe quantiser Q₂ in FIG. 4a. They, being assumed identical, thereforeproduce the same output q₂. In FIG. 4a the signal S2′ is formed asS2′=S2−q₂, while FIG. 4b performs the restoration S2=S2′+q₂. With S2thus restored, quantiser Q₁ in FIG. 4b is fed with the same signal asquantiser Q₁, in FIG. 4a, and signal S1 is restored in a manner similarto the manner S2 is restored.

[0051] The quantisers Q₁, and Q₂ are needed in order to prevent the wordlength of the modified signals S1′ and S2′ from exceeding that of theinput signals S1 and S2 ,so that the information content is notincreased.

[0052]FIG. 4 shows just four channels for simplicity, but it will beseen how this principle can be extended to any number of channels andhow a larger number of PMQs can be used in cascade. Each PMQ modifiesjust one audio channel, and in FIG. 4 only the first two channels aremodified. In practice, any or all of the channels may be modified, andthere is no restriction on order nor any prohibition that a givenchannel be modified more than once. In the case of a two-channeldownmix, it would be normal for at least the first two channels to bemodified.

[0053] It will be seen that each PMQ in FIG. 4 has a gain of unity tothe channel it modifies. It is not possible to synthesise the mostgeneral matrix from a cascade of such PMQs: WO-A 96/37048 explains thatthe set is restricted to matrices having a determinant equal to one. Inthe general case, it is necessary to scale the downmix equations inorder to obtain a determinant that has a unit magnitude. For example, inthe case of the downmix equations displayed earlier, they should bescaled by {fraction (4/3)}so that Matrix 1 in the encoder implements:$\begin{bmatrix}m_{0} \\m_{1}\end{bmatrix} = {\begin{bmatrix}1.0000 & 0. & {.9856} & {- {.1691}} & {- {.6667}} & {.6667} \\0. & 1.0000 & {- {.1691}} & {.9856} & {- {.6667}} & {.6667}\end{bmatrix}\begin{bmatrix}L_{f} \\R_{f} \\L_{s} \\R_{s} \\C \\L_{fe}\end{bmatrix}}$

[0054] while Matrix 0 in the two-channel decoder implements the inversescaling: $\begin{bmatrix}L_{0} \\R_{0}\end{bmatrix} = {{\begin{bmatrix}{.75} & 0 \\0 & {.75}\end{bmatrix}\quad\begin{bmatrix}m_{0} \\m_{1}\end{bmatrix}}.}$

[0055] It is evident that Matrix 0 cannot be implemented as a cascade ofPMQs because its determinant does not have a unit magnitude. This is nota problem because Matrix 0 is not required to provide losslessreconstruction of an original signal. An architecture that allows atwo-channel decoder to implement Matrix 0 as either a strict cascade ofPMQs for losslessly decoding a two-channel original signal, or as a moregeneral matrix for downmix applications, is shown in FIG. 8 anddescribed later.

[0056] To calculate the coefficients for the PMQs forming Matrix 0, thefollowing procedure may be adopted. Denote by downmix the matrix ofdownmix coefficients, for example in the case considered above, we have$\begin{matrix}{{downmix} = \begin{bmatrix}{.75} & 0 & {.739200} & {- {.126825}} & {- {.5}} & {.5} \\0 & {.75} & {- {.126825}} & {.739200} & {- {.5}} & {.5}\end{bmatrix}} \\{{{Then}{\quad \quad \quad}{for}{\quad \quad}j} = {1\quad \ldots \quad 6\quad {calculate}}} \\{{{coeff}_{1,j} = \frac{{downmix}_{i,j}}{{downmix}_{1,1}}},{{then}{\quad \quad}{calculate}}} \\{{{coeff}_{2,1} = {- \frac{{downmix}_{2,1}}{{{coeff}_{1,2}{downmix}_{2,1}} - {downmix}_{2,2}}}},{{{and}\quad {then}{\quad \quad}{for}{\quad \quad}j} = {3\quad \ldots \quad 6{\quad \quad}{calculate}}}} \\{{coeff}_{2,j} = {{- \frac{{downmix}_{2,j}}{{{coeff}_{1,2}{downmix}_{2,1}} - {downmix}_{2,2}}} - {{coeff}_{2,1}{coeff}_{i,j}}}}\end{matrix}$

[0057] The coefficients m_coeff in FIGS. 4a and 4 b for i j are nowgiven by the expression

m _(—) coeff[i, j]=−coeff _(i..j)

[0058] where the minus sign arises because of the subtraction in FIG.4a.

[0059] In the multichannel decoder of FIG. 2, the Inverse Matrix 1 maybe implemented as in FIG. 4b, using the same values m_coeff[i, j] as inthe encoder, but with the reversed order of PMQs and with subtraction ineach encoding PMQ replaced by an addition as shown. Note that the inputsm₀ . . . m₅ to the cascade of PMQs are derived from two substreams inthis case.

[0060] Although the invention as so far described is particularlyrelevant in the context of compression, it is applicable generally andnot restricted to compression systems. Also, the principle describedabove is not restricted to two substreams. For example, using threesubstreams a nine-channel signal can be conveyed losslessly, with theinformation required to decode a six-channel downmix carried in thefirst two substreams, and the information required to decode a twochannel downmix (as a linear combination of the six channels) carried inonly the first substream.

[0061] In current commercial applications, the matrix defining thedownmix signals L₀, R₀, in terms of L_(f), R_(f), L_(s), R_(s), C andL_(fe) will generally have the largest coefficients multiplying L_(f),and R_(f), as is the case in the example above. However, this situationcannot be guaranteed because the dominant coefficients may multiply someof the other signals. If the coefficients of L_(f) and R_(f) are indeedsmall, the requirement that a PMQ have unity gain to the channel that itmodifies introduces a problem because one or more other channels shouldbe scaled up accordingly. If simple scaling as shown above is used toaddress this problem, other coefficients of the matrix will exceed unityand, as a result, overload or other problems may occur.

[0062] This problem may be addressed by a permutation of the channels inthe encoder so that for example a ‘first’ channel whose coefficient inL₀ is largest could be brought to the beginning of the sequence and a‘second’channel whose coefficient in R₀ is largest is brought to secondplace. In this example, it is assumed the first and second channels arenot the same. This re-ordering usually makes it possible for the encoderto furnish matrixed signals m₀ and m₁ that are proportional to L₀ and R₀by using two PMQs whose coefficients do not substantially exceed unityto modify the first two channels.

[0063] With such a permutation in the encoder, the multichannel decoderof FIG. 2 will require an inverse permutation in order to reproduce thesignals in the correct order. Re-mapping of the output channels isprovided in an MLP decoder, as instructed by the ch_assign informationin the encoded stream. In the case that the encoder uses a permutation.it may instruct the decoder to apply the inverse permutation byspecifying the appropriate re-mapping.

[0064] The inverse permutation is applied after the decoder's matrixingif the encoder applies a permutation before matrixing. Anotherpossibility would be to apply the permutation in the decoder before thematrixing if permutation is applied in the encoder after matrixing.Additionally, it would be possible for a decoder of an MLP stream toapply the permutation before the matrixing if the coefficients of thematrix are also permuted.

[0065] There are certain unlikely but possible downmix specificationsthat the strategies outlined above will not handle. One possibility isthat L₀ and R₀ may have coefficients that are the same or nearly thesame or, in other words the downmix is mono or nearly mono. In thissituation the above procedure is unsatisfactory because the denominatorof the expression for coeff_(2, 1) becomes zero or nearly zero,resulting in large coefficients and a high probability of overload. Thisproblem can be solved by choosing m₀ and m₁ differently. Regarding thesignals as elements of a vector space, the signals L₀ and R₀ will ingeneral span a two-dimensional subspace of the 6-dimensional Euclideanvector space, or in general an n-dimensional Euclidean vector space, ofwhich the channels of the multichannel signal form an orthonormal basis.The signals m₀ and m₁ must span this, subspace if L₀ and R₀ are to bereconstructed. It is reasonable to choose m₀ and m₁ to be orthogonal orapproximately orthogonal to each other in the subspace spanned by L₀ andR₀. Having determined m₀ in terms of the input channels, these channelsmay be permuted prior to the matrix so that a channel whose coefficientin m₀ is largest, or substantially largest comes first. A PMQ is thencomputed as above so that the first transmitted channel is a scaledversion of the desired m₀. It is then necessary to compute a PMQ tofurnish a scaled version of m₁. Once again a prior permutation may bedesirable in order to minimise the magnitude of coefficients. Thispermutation of the signals to be matrixed is akin to the process of‘partial pivoting’ known to those skilled in the art of matrixcomputations, and will not be described further here. Initially, m₀ andm₁ may be given arbitrary scaling. Then the above procedure forcoefficient determination may then be used by replacing the matrixdownmix with the matrix giving m₀ and m₁ in terms of the originalchannels. The coefficients determined by this procedure will thendetermine the actual scaling of m₀ and m₁.

[0066] In the degenerate case where L₀ and R₀ are identical signals orare scaled versions of each other, the subspace spanned by L₀ and R₀will be one-dimensional. In this case m₀, may be chosen arbitrarilywithin the subspace and m₁ may be chosen to be orthogonal to m₀ but fromoutside the subspace. Matrix 0 in a two-channel decoder will thenreconstitute L₀ and R₀ as a scaled version of m₀ and will ignore m₁.

[0067] In the MLP lossless compression system, the coefficients ofMatrix 0 are carried in the first substream, Substream 0, and thecoefficients of Matrix 1 are carried entirely in the second substream,Substream 1, even though some of these coefficients are used to multiplysignals decoded from the first substream.

Downmix Encoding Combined With Data Rate Reduction

[0068] Lossless encoders using matrixing are discussed extensively inWO-A 96/37048, where the purpose of the matrixing is to reduce thecorrelation between the transmitted channels and thereby to reduce thetransmitted data rate. In the case where a downmix is to be encoded asdescribed above, the matrixing is partially specified by the downmixrequirement, but considerable freedom in the specification remains.

[0069] Firstly, in choosing m₀ and m₁, the condition that they beapproximately orthogonal still allows an arbitrary rotation within thesubspace spanned by L₀ and R₁. This freedom may be used to minimise thedata rate required to encode the first substream, Substream 0, forexample using the methods discussed in WO-A 96/37048 that minimise thedata rate taken by any signal of two or more channels.

[0070] Secondly, assuming for example a 6-channel multichannel signal,the matrixing of the four channels that are not modified to furnish thedownmix is still completely unspecified. Once again, the methodsdescribed in WO-A 96/37048 may be used to minimise the data raterequired to encode the second substream, Substream 1. In the case of aPMQ implementation, two PMQs may be used to derive the downmix, and anyremaining PMQs may be used minimise the data rate of the remaining fourchannels in the same way as for any other four channel signal. In theMLP compression system, six PMQs are available in total, allowing fourto be allocated to this task.

Dither

[0071] It is now regarded as extremely important in audiophile circlesthat any quantisation that affects the reproduction of the audio signalbe performed using dither. Typically, a small pseudo-random dither valueis added to the signal before it is passed to the quantiser. See forexample S.P. Lipshitz, R.A. Wannamaker, and J. Vanderkooy, “Quantizationand Dither: A Theoretical Survey,” J. Audio Eng. Soc., May 1992, vol.40, pp. 355-375.

[0072] The primitive matrix quantisers inherently perform quantisation.In the case of lossless encoding and decoding, the absence of dither isnot a problem because the lossless matrixing in the decoder invertsexactly the matrixing performed in the encoder, including anyquantisation effects. However in furnishing a downmix as describedabove, Matrix 0 does not invert the effect of Matrix 1 , and the downmixwill contain quantisation effects from both matrices.

[0073] In order to render the downmix quantisation benign, dither mustbe added by both matrices. However, adding dither in the encoder'sMatrix 1 will affect the transmitted signal, and the decoding of themultichannel signal will be affected thereby. Therefore for losslessdecoding, the Inverse Matrix 1 in the multichannel decoder mustcompensate for the effect of the dither in the encode matrixing.

[0074]FIG. 5a and 5 b show a complementary pair of primitive matrixquantisers including dither, in this case for a three channel signal.The two matrix quantisers differ only in that the signal q₁ issubtracted in the quantiser shown in FIG. 5a, whereas the same signal isadded in the quantiser shown in FIG. 5b. It is easily seen that,provided the signal furnished by the box marked ‘dither’ is the same inboth cases, the PMQ in FIG. 5b will undo the action of the PMQ in FIG.5a. Thus, an encoder as shown in FIG. 1 can be constructed in which‘Matrix 1’ is a cascade of PMQs as shown in FIG. 5a, and themultichannel decoder of FIG. 2 can be constructed in which ‘InverseMatrix 1’ is a reversed-ordered cascade of PMQs as shown in FIG. 5b.This will ensure that the multichannel signal is reconstructedlosslessly.

[0075] For the best quality downmix reproduction, the conventionalrequirements for dither should be satisfied both in the encoder's‘Matrix 1’ and in the decoder's ‘Matrix 0’. Thus for example in theencoder, the dither generator in FIGS. 5a and 5 b could advantageouslyfurnish TPDF dither with a peak-to-peak amplitude equal to twoquantisation steps of the quantiser Q. If the first two PMQs in theencoder furnish the downmix signal, then it is not necessary to adddither to the later PMQs.

[0076] Matrix 0 may be a different type of matrix, but it willnevertheless include computation, which increases the word length,followed by quantisation, and it is normal to add dither before eachquantisation.

[0077] The requirement for identical dither in the encoding and decodingquantisers of FIGS. 5a and 5 b can be met by the encoder recording a‘seed’ conveying the state of a pseudo-random sequence generator withinthe stream from time to time, and the decoder reading the seed andthereby synchronising its own sequence generator.

[0078] In MLP the sequence generator is a 23-bit circular shift registergenerating a pseudorandom:binary sequence (PRBS) using the expression:

b ₂₃ ⊕b ₅⊕1

[0079] where b_(x) represents bit x of the shift register, and

[0080] ⊕ represents the exclusive-OR operation.

[0081] Thus the seed in the stream is 23 bits long. The shift registeris shifted by 16 bits on each sample period. This allows a new 16-bitpseudo-random number with a rectangular PDF to be generated for eachsignal sample. However, because TPDF dither is preferred, the 16 bitsare divided into two 8-bit dither samples. These 8-bit samples each havea rectangular PDF, but the encoder has the option to add and subtractthese two samples to furnish two further uncorrelated dither sampleshaving a triangular PDF. This process is known as ‘Diamond Dither’ andis explained in the above-cited Wannamaker reference, AES preprint no.4533. The encoder can use these two triangular PDF samples to add ditherto two PMQs that furnish the downmix signal.

[0082] Audiophile considerations do not require that the dither appliedin Matrix 0 to recover the downmix signal be synchronised to acorresponding process in the encoder. Indeed it is undesirable that thesame dither be applied, or that Matrix 0 apply any dither that iscorrelated with the dither applied in Matrix 1 . In MLP the downmixdecoder generates a dither signal using same algorithm as themultichannel decoder. but the dither is different because the seed isdifferent: the seed for the Matrix 0 dither is carried in Substream 0,while the seed for the Matrix 1 dither is carried in substream 1.

[0083] In MLP, the quantisation and arithmetic of Matrix 0 are specifiedjust as precisely as for Matrix 1 ,and with the dither also controlledby the encoder, the encoder has precise knowledge of the L₀ and R₀signals recovered by the decoder, down to the last bit. We shall returnto this point later.

Saturation of Downmix

[0084] It is often considered commercially important to encode an audiosignal at the maximum level that the digital channel can handle. Peaksin live music can be very ‘uncontrolled’ and the average level must bekept well below digital clipping if no peak of a live signal is to causeoverload. However, the professional recording engineer is well equippedwith tools for waveform modification, such as clippers and limiters,that allow him to produce a ‘controlled’ signal that modulates a channelvery fully while ensuring that no peak will overload.

[0085] It will be understood that digital overload can result inextremely unpleasant artifacts caused by ‘wrap-round’ effects. Forexample, in conventional twos-complement 24-bit audio, the maximumpositive value is represented by 7 f f f f f hexadecimal. A naïveattempt to increase this value by one quantisation level will result in800000 hexadecimal, which is interpreted as the maximum negativeexcursion. Thus small overloads can generate full-scale transitionshaving a large high-frequency energy content, which sounds extremelyunpleasant and frequently causes burn-out of tweeters.

[0086] In the context of DVD mastering, it is assumed that a‘controlled’ multichannel master is produced and presented for losslessencoding. In other words, it is assumed that any overload problems inproducing the multichannel signal have already been dealt with. The taskremains to produce an acceptable L₀ R₀ downmix.

[0087] Overload at the output of the two-channel decoder of FIG. 3 canbe avoided by scaling down the coefficients of‘Matrix 0’ sufficiently.However such scaling down has two problems. Firstly the amount ofscaling required is not known until the entire programme material hasbeen examined, which is inconvenient at the mastering stage. Secondly,such scaling is likely to result in a downmix that is unacceptably quietby commercial standards. This is because any prior clipping or limitingof the multichannel signal is not necessarily effective in constrainingthe peak-to-mean ratio of a downmix derived from the multichannelsignal.

[0088] It is not possible to adjust the downmix at the encoding stage,because this would alter the transmission of m₀ and m₁, and recovery ofthe multichannel signal would then not be lossless.

[0089] Accordingly, the invention provides for a downmix decoder to havethe ability to generate internally a downmix signal having an amplitudelarger than a digital output can handle, and to incorporate a limiter orclipper prior to the final output so that overload of the downmix signalis handled without unpleasant effects.

[0090] In MLP, the output word width is specified as 24 bits, and mostof the internal signal paths, including the paths between the PMQs, arealso specified as 24 bits wide. However, after the last PMQ in thedecoder, a shifter is provided that shifts left or right by a variablenumber of bits specified by “output shift” information carried from timeto time in the encoded stream. If the encoder is given an input and adownmix specification that result in a downmix requiring more than 24bits, the encoder scales down the downmix specification to avoidoverload within the matrixing. This scaling down is by a power-of-two,so that the correct amplitude can be restored in the decoder byspecifying a positive left shift in the “output shift” information. Theshifter in the decoder thus generates a downmix signal of the correctamplitude, which may be too large for the 24-bit output. Therefore aclipper is placed between the shifter and the output, in order to avoidthe undesirable ‘wrap-round’ effect discussed earlier. The clipper mayconveniently be implemented using the facility provided in many DSPchips whereby a value in an accumulator may be stored to memory using‘saturation arithmetic’.

[0091] An additional synergy arises in this case if the memory locationto which the accumulator is stored can be calculated in dependence onthe “ch_assign” information in the stream. This accomplishes the inversepermutation of channels required in a decoder without having toimplement it as a separate operation.

LSB Bypass

[0092] If an input signal exercises the full 24-bit range, then anattempt to modify a channel using a PMQ according to FIG. 4 or 5 islikely to lead to a signal that exceeds the 24-bit range. This increasedrange, which is internal to the lossless encoding and decoding process,can be accommodated economically even on a processor using 24-bitarithmetic by using the architecture of FIG. 6.

[0093]FIG. 6a shows, on the left, a PMQ that incorporates a shifter. Thesignal paths are assumed to be 24 bits wide generally, but after thesubtraction of the quantised signal q from S1 a 25-bit data path isprovided to allow headroom for the addition. The signal is then shiftedright arithmetically by one bit and the LSB shifted from the bottom ofthe word is output separately from the main output S1′, which containsthe remaining 24 high-order bits.

[0094] The LSB thus shifted out must of course be carried with thesignal. To decode the signals S1, S2 and S3, the LSB together withsignals S1′, S2 and S3 should be presented to the inverse PMQ shown onthe right of FIG. 6b. Here the LSB is appended to S1′ and the result isshifted left by one bit so that the separately carried LSB is the LSB ofthe shifted word, thereby giving a 25-bit signal to which the quantisedsignal q is added. The result of this addition is only 24 bits wide byvirtue of lossless reconstruction of the signal S1 fed as input to thePMQ shown in FIG. 6a, provided that S1 is a 24 bit signal.

[0095] As shown on the right of FIG. 6a and on the left of FIG. 6b, itis possible to insert further lossless processing and inverse losslessprocessing of the 24-bit wide path between the two complementary PMQs,provided there is a bypass path so that the LSB is conveyed separately.For example, a partial block diagram of an MLP encoder is shown in FIG.7a and the corresponding decoder is shown in FIG. 7b. A decorrelator andan entropy coder comes after the matrix shown in FIG. 7a; thus, in thisexample, the ‘Lossless processing’ shown in FIG. 6a would include theseitems. Similarly, referring to FIG. 7b, the ‘Inverse LosslessProcessing’ shown in FIG. 6b could include an entropy decoder and arecorrelator. As shown in FIGS. 7a and 7 b. care is taken to preservethe bypassed LSB across this processing, to store it to and recover itfrom the encoded stream or substream.

[0096] Sometimes the matrixing in MLP does not cause overload, but thedecorrelator, while designed generally to reduce the signal amplitude.increases it on particular samples and thereby encounters an overloadproblem. In this case a PMQ of the type shown in FIG. 6a may be used toreduce the amplitude of the signal and thus provide approximately 6dB ofheadroom for further processing. The coefficients shown in FIG. 6 may beset to zero when a PMQ is used for this purpose only.

[0097] It will be clear that the scheme of FIG. 6a could be generalisedto allow more than one bit to be shifted out from a PMQ and transmittedas a bypass signal. This is not done in MLP.

[0098] The processing shown in FIG. 6a is lossless, and thecorresponding inverse lossless processing shown in FIG. 6b is alsolossless. Thus it is possible to nest this processing. For example, the‘Lossless Processing’ shown on the right of FIG. 6a could include a PMQof the sort shown on the left of FIG. 6a, and the coding effect of thisnested PMQ could be inverted by including in the ‘Inverse LosslessProcessing’ shown on the left of FIG. 6b a PMQ of the sort shown on theright of FIG. 6b. In this case a bypassed LSB will be generated at eachstage, so two bypassed LSBs must be carried round any furtherprocessing.

[0099] In an MLP encoder there are up to six PMQs in cascade, and any orall of them may be configured to provide a bypassed LSB. Thus thesubstream may carry up to six bypassed LSBs, one from each PMQ. Althougheach bypassed LSB comes from a different PMQ, there is no requirementthat they come from different channels. and the encoder may occasionallychoose to allocate two or more such PMQs to one channel and thus obtainan additional 12dB or more of headroom for that channel.

[0100] There are variants of the topology shown in FIGS. 6a and 6 b thathave an equivalent effect. The subtraction of the signal q in FIG. 6aand the addition of the signal q in 6 b could be interchanged.Subtraction can be avoided by inverting the sign of the coefficients, byinverting the sign of the dither if used, and if necessary by making anadjustment to the quantiser Q, for example by replacing a quantiser thatrounds down by a quantiser that rounds up. Another variation is to placethe quantiser Q in the forward path, as shown in FIG. 23a of WO-A96/37048, instead of in the side-chain, again taking care in choosingquantisers that round up or down. In FIG. 6b the shifting of the S1′signal and the LSB together may instead be implemented as a left shiftof the S1′ signal. Thereby producing a zero LSB, and then adding theseparately transmitted LSB. In this case the addition of the separatelytransmitted LSB may be combined with, or performed after. the additionof the quantised signal q. In embodiments for MLP, the addition shouldproduce a 24-bit number.

[0101]FIG. 8 shows the decoder PMQ specified for MLP, as configured torecover three channels S1, S2 and S3, with the second channel S2 beingmodified. This incorporates some of the variations discussed above andin addition uses a general multiplication to implement the left shift.The encoder specifies the coefficient values and includes them in thestream. Thus, to shift the signal S2′ left by one bit the encoder couldset the coefficient m_coeff[2, 2] equal to +2. MLP uses 16-bitcoefficients in the range [−2, +2); therefore the exact value +2 is notavailable and the encoder specifies −2 instead. Thus the decoding PMQinverts the signal in this case and the encoder must also invert thesignal to compensate.

[0102] As discussed previously, it is advantageous to have twouncorrelated RPDF dither signals in order to furnish two TPDF dithersignals by addition and subtraction. In the MLP matrixing, the two 8-bitRPDF dither signals obtained from the sequence generator aresign-extended to 24 bits and treated as if they were two extra channels.These dither channels are never modified by PMQs. It will be seen thatthe dither in FIG. 8 is given by:

m _(—) coeff[2, 4] Dither 0 +m _(—) coeff[2, 5] Dither1

[0103] This dither is like the dither identified as dither in FIG. 6b.If m_coeff[2, 4] and m_coeff[2, 5] have the same magnitude, dither willhave the desired triangular PDF. Thus, if two PMQs are used to furnish adownmix, the encoder will specify m_coeff[2, 4] and m_coeff[2, 5] withthe same sign in one PMQ and opposite signs in the other PMQ, thusfurnishing uncorrelated TPDF dither signals by the ‘Diamond Dither’method discussed above.

[0104] In FIG. 8 if we regard the input signal samples as 24-bitintegers, then the output values from the multipliers will in generalhave 14 bits after the binary point because the coefficients m_coeff[2,j] may have up to 14 bits after the binary point. We assume for themoment that the quantiser Q_(ss) quantises to a 24-bit integer value. Inthis case, if the two 8-bit RPDF dither values are right-justified inthe 24-bit words Dither0 and Dither1, then the correct magnitudes form_coeff[2, 4] and m_coeff[2, 5] are 2⁻⁸.

[0105] If additional PMQs are used to reduce the bit rate of the streamwithout affecting the downmix signals, it will be normal in the encodernot to use dither, hence the m_coeff[i, j] values used to multiply thedither channels in the PMQs will be zero. This suggests that an economycould be made by not including the dither capability in all PMQs. Thiseconomy is not made in MLP implementations. however. because theadvantages realized from the regularity of the structure in practicalembodiments far outweighs the cost of an additional pair ofmultiplications.

[0106] In MLP, cascaded PMQs according to FIG. 8 are used both forMatrix 0 and Matrix 1 . In the case of Matrix 1 ,it would be normal forthe coefficient of the channel being modified, which is m_coeff[2, 2] inthe case illustrated, to have the value -2 when the LSB bypass is used,and either +1 or -1 when the LSB bypass is not used. This choice is madeby the encoder and the coefficient is included in the stream for use bythe decoder.

[0107] When using the 2-channel decoder to reproduce a downmix, Matrix 0provides the matrixing and/or scaling of the m₀ and m₁ signals toprovide L₀ and R₀. General coefficients, not restricted to powers oftwo, are then required in the PMQs. Again regularity in the decoder andflexibility for the encoder are reasons for adopting the architecture ofFIG. 8 uniformly.

[0108] In Matrix 0 , scaling of the modified channel can be accomplishedby scaling all the coefficients, except the dither coefficients, thatcontribute to it. If scaling up is required, there is a possibility thatthe required scaling will exceed the available coefficient range of [−2,2), or that signal overload will occur within the matrixing. This can bedealt with by reducing the scaling by a power of 2, then using the final“output_shift” to restore the desired level.

[0109] In MLP with downmix, it is not normal to carry the bypassed LSBsin the first substream, Substream 0, since the downmix decoder does notattempt lossless reproduction. The second substream, Substream 1 carriesall the information required for the multichannel decoder's matrixing,including the coefficients, the dither seed, and the bypassed LSBsincluding those LSBs that were dropped from channels that are carried insubstream 0.

[0110] One feature of FIG. 8 that does not affect the above discussionis that the quantiser Q_(ss) is able to quantise to a step-size that isa power of 2,thus putting the truncation point one or more bits abovethe LSB. This facility is included in order to optimise the treatment ofinput signals that do not exercise the least significant bit(s) of the24-bit word. In MLP, the LSB bypass feature is used only when thequantisation step size is set to unity.

Stream Integrity and ‘Lossless Check’

[0111] A lossy coding system generally furnishes an output that is notan exact reconstruction of the input signal. Integrity checking, forexample a cyclic redundancy check (CRC) or a parity check, should berestricted to a check of the encoded stream so that transmission errorsmay be flagged. The relationship between the input signal and its finalreconstruction is somewhat unknown, being affected both by inherentlosses in the lossy encoding and decoding process, and byplatform-related errors caused by the arithmetic behaviour of thedecoding processor possibly being different from that of the encodingprocessor.

[0112] In MLP, a parity word known as a ‘Lossless Check’ value, iscomputed for each segment of the input signal, and included in theencoded stream. It is expected that a decoder will compute a similarparity word and indicate an error has occurred if this computed worddoes not match the word included in the stream. Unlike the checks thatare possible in a lossy coding system, the checks made in a losslesscoding system are able to show failures due to overload or otheralgorithmic failures within the algorithm, platform-relatedinconsistencies and transmission errors.

[0113] In preferred embodiments, a player is able to inform the user ofsuch errors: for example a “Lossless” light could be illuminated whenthe two check words agree and be extinguished otherwise. Since failurecould be momentary, a pulse-stretching circuit may be used so that theuser has time to recognize the failure, for example the light could beextinguished for two seconds on receipt of a single failure.

[0114] In MLP the Lossless Check value is an 8-bit parity word that iscomputed for all channels and all samples within a segment of,typically, 1280 words. In terms of the MLP specification, this segmentincludes all samples between two consecutive ‘Restart points’. As MLPassumes 24-bit words, the parity would naturally be computed as a 24-bitword, but this parity word is divided into three octets or bytes andthese are exclusively-ORed together in order to furnish the LosslessCheck value. Before computing the parity, each 24-bit signal word isrotated by a number of bits equal to its channel number. This rotationavoids a problem where an error that affects two channels identicallywould otherwise not be detected.

[0115] An alternative implementation is to take the parity of all theoctets within each segment of each channel to produce an 8-bit parityoctet. and rotate each parity octet by its channel number beforeexclusively-ORing them together. This may be more economical onprocessors not having a 24-bit word length.

[0116] In MLP with a single substream, the Lossless Check value relatesto the original signal that is being losslessly reproduced. When MLP iscarrying a downmix, the second substream carries the Lossless Checkvalue relating to the original signal, and this will be checked by amultichannel decoder.

[0117] In this downmix case the first substream also carries a LosslessCheck value , but this relates only to the downmix. Although the downmixoutput is not a lossless reproduction of an original signal, it isdeterminable by virtue of the precise specification of the quantisationsin Matrix 0 and the precise specification of the dither. Therefore, theencoder can determine the downmix that will be reproduced by a decoder,and can compute the ‘lossless check’ value from this simulated downmix.In the context of DVD-Audio mastering, it is intended that the encodershould make the simulated downmix available for auditioning, thereforethe listener can be assured that the signal recovered in his player isbit-for-bit identical to the signal heard by the mastering engineer orthe recording producer.

[0118] An exception arises in the case of overload, which as describedabove is normally handled by clipping or limiting in the player. Becausethe behaviour of the clipping or limiting is not precisely defined, theLossless Check value is computed from the signal immediately prior toany saturation or limiting. In MLP, where as explained above the decoderincorporates a shifter after the final PMQ, and may implement clippingby storing an accumulator to memory using saturation arithmetic, theLossless Check may be computed directly from the value in theaccumulator, which is thereby not affected by the saturation.

[0119] Sometimes, as shown in FIG. 9, a lossless encoder may be precededby a prequantiser in order to reduce the transmitted data rate.Additional information pertaining to prequantisation may be obtainedfrom the AES 1997 and AES 1998 references cited above. In thesesituations, the reproduction of the original signal received by theprequantiser will not be lossless but the reproduction of theprequantised signal will be lossless. Again. the prequantised signalshould be made available for auditioning and the Lossless Check valueshould be computed from the prequantised signal so that the listener canbe assured that the signal recovered in his player is bit-for-bitidentical to the signal that w as auditioned or at least was availablefor audition. at the mastering stage.

Encode Matrix Choice Strategies

[0120] To encode a two-channel downmix, the signals m₀ and m₁ must be inthe subspace spanned by the downmix channels L₀ and R₀. There isconsiderable flexibility within this criterion, but some choices arebetter than others. The encoder should avoid choosing in. and m, to benearly linearly dependent for several reasons. Firstly, the matrixMatrix 0 would then probably have large coefficients and the recovery ofthe downmix would be noisy. Secondly, in solving the equations todetermine the PMQs comprised in Matrix 1 the encoder would probablygenerate coefficients larger than the admissible range. Thirdly,matrixing of the signals affects the data rate for lossless compression,and it is inefficient to transmit separately signals that are verysimilar to each other.

[0121] As noted previously, one way to avoid the worst of these problemsis to choose m₀ and m₁ to be orthogonal to each other. That is, m₀ andm₁ are defined in terms of the input signals by a matrix whose rows areorthogonal to each other. This criterion still leaves some flexibility,which could be resolved for example by taking m₀ proportional to L₀.Consider for example the downmix specification: $\begin{bmatrix}L_{0} \\R_{0}\end{bmatrix} = {{\begin{bmatrix}{.75} & 0 & {.75} & {- {.126825}} & {- {.5}} & {.5} \\0 & {.75} & {- {.126825}} & {.8} & {- {.5}} & {.5}\end{bmatrix}\begin{bmatrix}L_{f} \\R_{f} \\L_{s} \\R_{s} \\C \\L_{fe}\end{bmatrix}}.}$

[0122] Here the largest coefficient contributing to L₀ is that of L_(f),which has a value equal to 0.75. Therefore, if we generate m₀ equal toL₀ scaled by 1/0.75 =1.333, we have:${m_{0} = {\left\lbrack {1.0000,0.,1.0000,{- {.1691}},{- {.6667}},{.6667}} \right\rbrack \begin{bmatrix}L_{f} \\R_{f} \\L_{s} \\R_{s} \\C \\L_{fe}\end{bmatrix}}},$

[0123] which can be implemented by a PMQ that leaves the first channelunmodified.

[0124] Signal m₁ must be a linear combination of L₀ and R₀. A linearcombination that is orthogonal to L₀ and hence also orthogonal to m₀ isgiven by

m ₁ (unscaled)=R ₀−λL_(0,)

[0125] where

[0126] and $\lambda = \frac{R_{o} \cdot L_{o}}{L_{o} \cdot L_{o}}$

[0127] the symbol denotes the scalar or dot product of two vectors.

[0128] The resulting value is equivalent to taking the dot products ofthe row vectors in the downmix matrix. If we use downmix to denote thedownmix matrix, then the scalar λ may be expressed as$\lambda = \frac{{downmix}_{2} \cdot {downmix}_{1}}{{downmix}_{1} \cdot {downmix}_{1}}$

[0129] where downmix₁ denotes the first row vector of the matrix;

[0130] downmix₂ denotes the second row vector of the matrix; and

[0131] Using the downmix matrix from the example shown above, λ=0. 1849.Thus:${m_{1}({unscaled})} = {{\left\lbrack {{- {.1387}},{.7500},{- {.2655}},{.8234},{- {.4076}},{.4076}} \right\rbrack \begin{bmatrix}L_{f} \\R_{f} \\L_{s} \\R_{s} \\C \\L_{fe}\end{bmatrix}}.}$

[0132] The second PMQ that will generate m,, receives the signalsfurnished by the first PMQ, the first channel of which is m₀ rather thanL₀. Therefore m₁ must be re-expressed in terms of m₀, R₀ etc.:${m_{1}({unscaled})} = {{\left\lbrack {{- {.1387}},{.7500},{- {.1268}},{.8000},{- {.5000}},{.5000}} \right\rbrack \begin{bmatrix}m_{0} \\R_{j} \\L_{s} \\R_{s} \\C \\L_{fe}\end{bmatrix}}.}$

[0133] Here the largest coefficient, 0.8000, multiplies R_(s), thefourth input channel. Therefore we apply a permutation, as discussedpreviously, to swap the second and fourth input channels and thus bringR_(s) to the second position so that m₁ will appear in the secondposition in the matrix output:${m_{1}({unscaled})} = {{\left\lbrack {{- {.1387}},{.8000},{- {.1268}},{.7500},{- {.5000}},{.5000}} \right\rbrack \begin{bmatrix}m_{0} \\R_{s} \\L_{s} \\R_{f} \\C \\L_{f\quad e}\end{bmatrix}}.}$

[0134] Finally we scale so that the coefficient of R_(s) is unity:$m_{1} = {{\left\lbrack {{- {.1733}},1.0000,{- {.1585}},{.9375},{- {.6250}},{.6250}} \right\rbrack \begin{bmatrix}m_{0} \\R_{s} \\L_{s} \\R_{f} \\C \\L_{f\quad e}\end{bmatrix}}.}$

[0135] This is now in the correct form for implementation by a secondPMQ.

[0136] The above example shows one of several strategies that can beadopted by an encoder. A simpler strategy is to compute m₀ as above,then to define m₁, apart from scaling, by subtracting a proportion λ ofL₀ from R₀ such that the coefficient of L_(f) is zero. In thisparticular example, the sparsity of the original downmix specificationresults in this condition being satisfied with λ=0:${m_{1}({unscaled})} = {{\left\lbrack {0.,{.7500},{- {.1268}},{.8000},{- {.5000}},{.5000}} \right\rbrack \begin{bmatrix}L_{f} \\R_{f} \\L_{s} \\R_{s} \\C \\L_{f\quad e}\end{bmatrix}}.}$

[0137] The zero value of the first coefficient avoids the need, whencalculating the second PMQ, to consider the effect of the first PMQ.That is, m₀ can be substituted for L_(f) in the above equation withoutmaking any other change. Applying scaling and permutation as discussedpreviously, we obtain:${m_{1} = {\left\lbrack {0.,1.0000,{- {.1585}},{.9375},{- {.6250}},{.6250}} \right\rbrack \begin{bmatrix}m_{0} \\R_{s} \\L_{s} \\R_{f} \\C \\L_{f\quad e}\end{bmatrix}}},$

[0138] which is of the correct form for implementation by the secondPMQ.

[0139] Although the above simplified procedure does not achieveorthogonality, it does avoid generating m₀, and m₁ that are nearlylinearly dependent, for example if L₀ and R₀ themselves were nearlylinearly dependent. The possibility that L₀ and R₀ are actually linearlydependent (i.e. are scaled versions of each other) must be tested forand treated as a special case.

[0140] Alternatively, in a more advanced encoder, the aboveorthogonality condition can be replaced by the condition that thecross-correlation of the signals m₀ and m₁ should be approximately zero.This condition can be satisfied by an appropriate choice of λ. Thecondition of zero cross-correlation minimises the energy in m₁, and inthe absence of frequency dependence this would be effective inminimising the transmitted data rate. As explained in WO-A 96/37048,data rate in the presence of spectral variation is more dependent oninformation content than on energy. With typical audio signals, theenergy and cross-correlation will be dominated by large low-frequencysignals, which have little information content on account of their lowbandwidth. Hence it is better to apply a spectral weighting, which willtypically emphasise high frequencies before calculating crosscorrelation. Ideally the spectral weighting will be adapted to thesignal itself, but it is complicated to determine an optimal ornear-optimal weighting, and in practice a fixed weighting will suffice.For example, a digital filter whose z-transform is

(1−z ⁻¹)²

[0141] will have a response rising at 12 dB per octave over the low andmid-frequency part of the audio band, and this will generally besufficient to suppress undue domination by large low-frequency signals.

[0142] In WO-A 96/37048, the preferred directions for the transmittedsignals was disclosed as being the eigenvectors of a matrix that, in theabsence of frequency-dependence, would have been the correlation matrixof the signals. Such a choice would lead to zero correlation between thetransmitted signals. However computation of eigenvectors is timeconsuming, and the procedure outlined above wherein the zero correlationis achieved simply by subtraction leads to a data rate thattheoretically differs little from that resulting from an eigenvectorcomputation.

[0143] The procedures above for choosing the directions of thetransmitted signals can also be applied generally, that is to encodersthat do not compute a downmix, or to the processing of the remainingchannels once a downmix has been extracted.

[0144] We now describe a procedure in which the vector directions of thetransmitted channels are chosen one by one. A first input channel ischosen, and other channels are subtracted from it with coefficientschosen to minimise the energy in the signal remaining after thesubtraction. A primitive matrix quantiser implements the subtraction andfurnishes an output signal. Then another input channel is chosen, andagain the other channels are subtracted by a PMQ. The PMQ furnishes thenext output signal and has coefficients chosen to minimise the energytherein. The process is repeated until all input channels have beenprocessed, or until all available PMQs have been used, or until it isconsidered not worth applying further matrix transformations. Anyfurther input channels that have not been modified by PMQs are passed tothe output without modification.

[0145] An improvement on this procedure would be to choose thesubtraction so as to minimise some measure of entropy, or informationcontent, of the signal rather than simply to minimise the energy. InWO-A 96/37048, the entropy was estimated by taking the integral overfrequency of the logarithm of the spectrum. and it would be entirelypossible to compute each minimisation with respect to this criterion.Minimisation of spectrally-weighted energy would be a lesscomputationally-intensive alternative, and there are various ways ofcomputing an appropriate spectral weighting in dependence on the signal.More economical still would be the use of a fixed frequency weighting,for example as provided by a digital filter having z-transform (1−z⁻¹)².

[0146] It will be recognised by those skilled in the art of numericalmatrix algebrathat the above process is somewhat akin to the use ofGram-Schmidt Orthogonalisation to furnish an orthogonal set of vectors.By analogy it might be considered unnecessary, when considering thesubtraction, to include vectors that have already been processed, sincethey are by construction orthogonal to the vectors that have not yetbeen processed. However this will not generally be true when a downmixis being encoded, nor will it be true if the minimisation is of entropyrather than energy. Hence in general, each PMQ will subtract bothsignals that have already been processed and input channels that haveyet to be processed.

[0147] So far the order in which channels are chosen for modificationhas been considered to be arbitrary. In many cases the order may havelittle effect on the final data rate, but it can substantially affectthe size of the coefficients in the subtraction. As MLP restrictscoefficients to a maximum value of 2, this consideration is important.If the minimisation is of energy, or of energy with a fixed spectralweighting, this is extremely fast computationally and it is entirelypossible to make an arbitrary selection on a trial basis and to rejectthat and try another if the coefficients are too big. Another heuristicis to choose for modification the channel whose energy, or spectrallyweighted energy, is the smallest.

[0148] If the PMQ is implemented as in FIG. 8, it would be normal tochoose a coefficient of +1 or −1 for the channel being modified. If thesubtraction generates signals that overload, the coefficient may bereduced. It would be normal in MLP to reduce it to −0.5, using the LSBbypass method described above. This will provide an additional 6dB ofheadroom, which will usually be sufficient. If it is not, there areseveral possibilities. The currently considered matrix transformationmay be modified or abandoned: that is, the input channel may betransmitted without modification. Or, if another PMQ is available, ittoo may be configured for LSB bypass operation and allocated to thechannel under consideration allowing a further 6dB increase in headroom.The additional PMQ will be applied prior to the PMQ that implements thesubtraction. The additional PMQ, being required simply to reduce thesignal amplitude, will normally in MLP apply a coefficient of −0.5 tothe channel being modified, and have zero coefficients otherwise.

[0149] A particular case where two or even three PMQs may be needed toprocess a channel is where a downmix specification has severalcoefficients of substantially the same magnitude. For example, althoughthe PMQ that furnishes m₀ in the example above has all coefficients lessthan unity, the sum of absolute magnitudes of the coefficients is 2.627.Thus, even if the PMQ furnishing m₀ uses LSB bypass and scales thechannel by 0.5, there is still a possibility of an increase in signalmagnitude of a factor 1.313. This can happen if, on a given sampleperiod, channels of the input achieve full modulation simultaneously andeach has the same sign as its coefficient in the PMQ, or if each has theopposite sign as its coefficient. Overload can be avoided by allocatingan additional PMQ implementing an LSB bypass prior the PMQ thatfurnishes m₀.

[0150] For clarity, the above description mentions only the PMQsimplemented by the encoder. It will be understood that for each PMQ ituses, the encoder must specify a corresponding PMQ to be used in Matrix1 by the lossless decoder, and that the decoder's PMQs must be appliedin reverse order. In the case of LSB bypass. an encoder PMQ applying acoefficient of-0.5 to the channel being modified implies a decoder PMQapplying a coefficient of-2.0 to that channel. In the downmix case, theencoder must specify the coefficients for Matrix 0 in dependence on thechoices made for m₀ and m₁. Further, if a channel has been scaled, thescaling factor must be taken into account in calculating subsequentdownmix coefficients that will multiply the channel.

Encoding of Mixed-rate Content

[0151] The DVD-Audio specification allows for a recording to be carriedon the disc using two sampling frequencies. For example, the frontalchannels L_(f), R_(f) may be encoded at 96 kHz sampling rate, while theother channels may be encoded at 48 kHz in order to reduce the datarate. However, the preceding description of the simultaneoustransmission of downmix information in a first substream assumes thatthe channels are all sampled simultaneously and, in particular, at thesame sampling rate.

[0152] The article P.G. Craven, M.J. Law J.R. and Stuart, ‘LosslessCompression using IIR Prediction Filters’, J. Audio Ezig. Soc.,Abstracts, Mar. 1997, vol. 45, no. 5, p. 404 preprint no. 4415 explainsthat, when using lossless compression, it is not necessary to reduce thesampling rate in order to save data. It is sufficient to restrict thebandwidth of the signal because the lossless encoder will automaticallyrespond to the reduction in information content of the signal and encodeit to a lower bit rate.

[0153] An upsampled signal inherently has a restricted bandwidth. Forexample, a 96 kHz sampled signal has the ability to reproducefrequencies up to nearly 48 kHz, but such a signal will have very littleenergy above 24 kHz if it is derived by upsampling a 48 kHz sampledsignal. Accordingly, when lossless compression is used on ‘mixed-rate’material, it is possible, without significant adverse effect on thedata-rate, to ‘upsample’ any channels that are presented at a lowerrate, e.g., 48kHz, before encoding so that all channels are encoded atthe same sampling rate, e.g., 96 kHz. This unified sample rate makespossible the matrix operations required in order to implement theinvention.

[0154] ‘Upsampling’ is also known as ‘interpolation’ in the DigitalSignal Processing literature, and the techniques for performing it arewell known. FIG. 10 shows an encoder adapted to include this feature. Asfiltering involves delay, the channels L_(f) and R_(f) that do notrequire upsampling are given a compensating delay.

[0155] Interpolation filtering is in general not lossless, but in apreferred embodiment the ‘upsample’ filters in FIG. 10 are of the typeknown as ‘half band filters’. When used for interpolation, half-bandfilters furnish an output with twice as many sampling points as theinput sampling points. The even-numbered output points correspond to theinput points and contain sample values identical to the input values,while the odd-numbered output points lie half way between the inputvalues and contain interpolated values.

[0156] When a stream is encoded in this way, the player has two options.It may play the stream as if all the channels were originally sampled at96 kHz. thus ignoring the differing provenance of even and odd samples.Alternatively the player may select only the even samples in the case ofchannels that were originally presented to the encoder at 48 kHz. Inthis case the player has access to a lossless reconstruction of themixed-rate content that was presented to the encoder. In order to makethis possible, the encoded stream must contain a specification of whichchannels were originally presented at the lower sampling rate, and anindication of which samples are to be regarded as ‘even’ and which areto be regarded as ‘odd’. The latter may be implicit if the streamcontains a block structure in which the number of samples in a block isalways even. On DVD-Audio, the use of ‘Access Units’ and ‘PresentationUnits’ provides such a structure.

[0157] The DVD-Audio specification provides similarly for mixed-ratecontent at 88.2 kHz and 44.1 kHz. The mixed-rate coding featuredescribed above may also be applied to this case in a similar manner.

Implementation

[0158] The functions required to practice various aspects of theinvention can be performed by components that are implemented in a widevariety of ways including discrete logic components, one or more ASICsand/or program-controlled processors. The manner in which thesecomponents are implemented is not critical. For example, operationsrequired to practice these aspects of the invention can be implementedby in an apparatus that comprises one or more terminals for receivingand sending signals representing digital information, random accessmemory for storing the digital information, a medium for recording oneor more programs of instructions, and a processor that executes theprograms of instructions. The programs of instructions may be recordedby a variety machine readable media or other products of manufactureincluding various types of read-only memory, magnetic tape, magneticdisk, optical disc, or conveyed by baseband or modulated communicationpaths throughout the spectrum from supersonic to ultravioletfrequencies.

[0159] Various features of the encoding and decoding processes andapparatus have been described above. It is to be understood that, wherethese features can be implemented separately, it is envisaged that thesefeatures may be brought together in any combination, in order to benefitfrom the different advantages provided by those features. While theclaims define various features independently, the features of all claimscan be combined with each other and this disclosure is intended toinclude all such combinations.

1. A decoder comprising: an input for a number N of encoded inputchannels, a matrix for transforming the input channels and implementedas a cascade of primitive matrix quantisers, the matrix providing thenumber N of matrix output channels, a re-mapping arrangement arrangedsuch that a number N of decoder output channels are ordered in responseto channel ordering information derived from the input channels.
 2. Adecoder as claimed in claim 1, wherein the re-mapping arrangement isprovided after the matrix.
 3. A decoder as claimed in claim 1, whereinthe re-mapping arrangement is provided before the matrix.
 4. A decoderas claimed in claim 1, wherein the number N is six, and the encodedchannels comprise the left-front, right-front, left-surround,right-surround, centre and low-frequency-effects channels of a sixchannel audio signal.
 5. An encoder comprising: a number N of inputchannels; a reordering arrangement for permuting the channels; a matrixfor transforming the input channels and implemented as a cascade ofprimitive matrix quantisers, the matrix providing the number N of matrixoutput channels as a stream of encoded information formatted as aplurality of substreams, the data in the first substream comprising astrict subset of the outputs of the matrix and containing sufficientinformation for implementation of a downmix specification; and means forencoding the selected permutation into the encoded output stream.
 6. Anencoder as claimed in claim 5, wherein the reordering arrangement isresponsive to the downmix specification.
 7. An encoder as claimed inclaim 5 providing lossless compression, and further comprising at leastone primitive matrix quantiser that modifies a channel that is not fedto the first substream, wherein the coefficients of that primitivematrix are chosen with the object of reducing the data rate of theencoded stream.
 8. A computer memory product having stored thereon anencoded audio data signal, the encoded audio data signal comprising anumber N of encoded audio channels which have been encoded by a matrixtransformation, the encoded audio data further comprising channelordering information, wherein the channel ordering information isprovided for causing reordering of the channels at the input or outputof a matrix transformation unit of a decoder for decoding the audiodata.
 9. An encoded audio data signal provided on a carrier, the encodedaudio data signal comprising a number N of encoded audio channels whichhave been encoded by a matrix transformation, the encoded audio datafurther comprising channel ordering information, wherein the channelordering information is provided for causing reordering of the channelsat the input or output of a matrix transformation unit of a decoder fordecoding the audio data.
 10. A method of encoding a number N of inputchannels comprising: permuting the channels; applying a matrixtransformation to the reordered input channels using a cascade ofprimitive matrix quantisers, the matrix providing the number N of matrixoutput channels as a stream of encoded information formatted as aplurality of substreams, the data in the first substream comprising astrict subset of the outputs of the matrix and containing sufficientinformation for implementation of a downmix specification; and encodingthe selected permutation into the encoded output stream, wherein thepermutation of the channels takes into account the downmixspecification.
 11. A method of decoding a number N of input channels,the method comprising: applying an inverse matrix transformation to theinput channels using a cascade of primitive matrix quantisers, thematrix providing the number N of matrix output channels; obtainingchannel ordering information from the encoded input channels; andpermuting the matrix output channels in dependence on the channelordering information.
 12. A decoder comprising: an input for an encodedstream comprising a plurality of encoded channels; at least a firstprimitive matrix quantiser that modifies a first channel; a multiplierfor multiplying the first channel by a gain coefficient; and a combinerfor combining the multiplied first channel signal with additional leastsignificant bits recovered from the encoded stream, wherein the gaincoefficient is selectable by the decoder based on information in theencoded stream, and may take a number of values including one or morevalues which are not powers of two.
 13. A decoder as claimed in claim12, wherein the modified first channel is a linear combination of thechannels input to the primitive matrix quantiser.
 14. A decoder asclaimed in claim 12, wherein the combiner comprises an adder.
 15. Anencoder for encoding a plurality of channels, the encoder comprising: atleast a first primitive matrix quantiser that modifies a first channel;a multiplier for multiplying the first channel by a gain coefficientwithin the first primitive matrix quantiser; means for recovering anyleast significant bits which result from the multiplication which exceeda number of bits allocated to the channel; and means for storing therecovered least significant bits, the multiplied modified first channeland a parameter representing the gain coefficient to enable futuredecoding, wherein the gain coefficient may take a number of valuesincluding one or more values which are not powers of two.
 16. A computermemory product having stored thereon an encoded audio data signal, theencoded audio data signal comprising a number N of encoded audiochannels which have been encoded by a matrix transformation, the encodedaudio data further comprising a parameter indicating a gain coefficientfor at least one channel, and the encoded audio signal furthercomprising additional least significant bits for the at least onechannel, wherein the gain coefficient is provided for causingmultiplication of the channel within a matrix transformation unit of adecoder for decoding the audio data, and the additional leastsignificant bits are provided for combination with the multipliedchannel, and wherein the gain coefficient and may take a number ofvalues including one or more values which are not powers of two.
 17. Acomputer memory product as claimed in claim 16, wherein N=6.
 18. Anencoded audio data signal provided on a carrier, the encoded audio datasignal comprising a number N of encoded audio channels which have beenencoded by a matrix transformation, the encoded audio data furthercomprising a parameter indicating a gain coefficient for at least onechannel, and the encoded audio signal further comprising additionalleast significant bits for the at least one channel, wherein the gaincoefficient is provided for causing multiplication of the channel withina matrix transformation unit of a decoder for decoding the audio data,and the additional least significant bits are provided for combinationwith the multiplied channel, and wherein the gain coefficient may take anumber of values including one or more values which are not powers oftwo.
 19. A method of decoding an encoded stream comprising a pluralityof encoded channels, the method comprising: applying an inverse matrixtransformation to the input channels using a cascade of primitive matrixquantisers, a first primitive matrix quantiser being used to modify afirst channel; within the first primitive matrix quantiser, multiplyingthe first channel by a gain coefficient derived from information in theencoded stream; and combining the multiplied first channel signal withadditional least significant bits recovered from the encoded stream,wherein the gain coefficient may take a number of values including oneor more values which are not powers of two.
 20. A method as claimed inclaim 19, wherein the combining comprises adding.
 21. A method ofencoding a plurality of input channels, the method comprising: applyinga matrix transformation to the input channels using a cascade ofprimitive matrix quantisers, a first primitive matrix quantiser beingused to modify a first channel; within the first primitive matrixquantiser, multiplying the first channel by a gain coefficient,recovering any additional least significant bits which result from themultiplication which exceed a number of bits allocated to the channel;and storing the additional least significant bits, the multipliedmodified first channel and a parameter indicating the gain coefficientto enable fixture decoding, wherein the gain coefficient may take anumber of values including one or more values which are not powers oftwo.
 22. An encoder apparatus for a lossless compression systemfurnishing an encoded compressed stream having at least two substreams,one of which provides a two-channel downmix signal and the otherprovides a multichannel digital signal, the encoder comprising: an inputfor the multichannel digital signal, an input for receiving aspecification for the two-channel downmix signal; and means forcomputing a first check value relating to a portion of downmix signaland inserting the first check value in a first substream and forcomputing a second check value relating to a portion of the multichannelsignal and inserting the second check value in a second substream. 23.An encoder apparatus as claimed in claim 22 further comprising a downmixsignal output enabling the downmix signal to be auditioned.
 24. Adecoder apparatus for decoding a losslessly compressed encoded signal,the decoder comprising: an input for a multichannel encoded digitalsignal; means for computing a first check value relating to a portion ofthe multichannel signal, means for retrieving a second check value fromthe encoded stream relating to said portion of the multichannel signal;a comparator arrangement for comparing the first and second checkvalues; and an output device for providing a flag indicating whether thecheck values agree.
 25. An apparatus as claimed in any one of claims 22to 24 comprising a digital signal processor for implementing eachcomputation of a check value as a bitwise parity operation on the binaryrepresentations of the signal words in a segment of the signal, thebinary words being rotated in dependence on the channel number beforethe parity is computed.
 26. A player for a consumer disc comprising adecoder according to claim 24, wherein the output device comprises avisible indicator, and wherein the player further comprises apulse-stretching circuit for providing a drive signal for the visibleindicator, configured such that a lack of agreement between the firstand the second check values for a time period shorter than a thresholdlevel results in a visible indication for a time period longer than thethreshold level.
 27. An apparatus comprising an encoder as claimed inclaim 22 and a prequantiser, the encoder providing as outputs an encodedcompressed stream and a prequantised signal that can be auditioned,wherein the check value inserted in the compressed stream is computedfrom the prequantised signal.
 28. A two-channel lossless decoderreceiving as input an encoded stream, the decoder comprising: a decodercore to which the stream is supplied to generate a two-channel decodedsignal; a shifter at the output of the decoder core for applying anarithmetic shift in response to information in the encoded stream; and asignal limiting device at the output of the shifter, the shifter and thelimiting device providing limitation of the wordwidth at the output ofthe decoder.
 29. A decoder as claimed in claim 28, wherein the encodedinput stream comprises at least two substreams, which together define amulti-channel encoded audio signal having more than two channels, andwherein one of the substreams is supplied to generate the two-channeldecoded signal.
 30. A decoder as claimed in claim 28 or 29 wherein thelimiting device comprises a clipper which stores the output of thearithmetic shift using saturation arithmetic.
 31. An encoder comprising:an input for receiving a multi-channel signal having a first inputchannel or channels sampled at a first rate and a second input channelor channels sampled at a higher rate equal to twice the lower rate; adevice for increasing the sampling rate of the or each first inputchannel to the higher rate; and a lossless encoder which receives thefirst and second channels at the higher rate, for generating an encodedstream.
 32. An encoder as claimed in claim 31 further comprising meansfor inserting sample rate information into the encoded streamindicating, for each decoded channel, whether the corresponding inputchannel was sampled at the first or at the second rate.
 33. An encoderas claimed in claim 32, wherein each device for increasing the samplingrate comprises half band filters providing a first plurality of samplescorresponding to the input signal and a second plurality of interpolatedsamples.
 34. An encoder as claimed in claim 33, wherein the means forinserting sampling rate information indicates which decoded samplescorrespond to the input signal.
 35. An encoder as claimed in any one ofclaims 31 to 34 further comprising delay elements in the signal paths ofthe higher rate channels that substantially compensate the delaysintroduced by the sample rate increase of the lower rate channels.
 36. Adecoder comprising an input for an encoded stream produced by theencoder of claim 33 or 34 and furnishing a multichannel output, whereinthe decoded samples of the lower-rate channels that do not correspond tooriginal samples of the input channels are discarded, thereby furnishingan output identical to the multi-channel signal originally presented tothe encoding apparatus.
 37. A computer memory product having storedthereon an encoded audio data signal, the encoded audio data signalcomprising a plurality of encoded audio channels representing channelsignals sampled either at a first sampling rate or at a higher secondsampling rate which is double the first sampling rate, wherein theencoded audio channels are all sampled at the second higher rate, andwherein additional information is provided for each channel indicatingwhether the channel signal was sampled at the first or the second rate.38. A computer memory product as claimed in claim 37 wherein theadditional information further indicates, for those encoded channelsrepresenting channel signals sampled at the first rate, which decodedsamples correspond to the input signal.
 39. An encoded audio data signalprovided on a carrier, the encoded audio data signal comprising aplurality of encoded audio channels representing channel signals sampledeither at a first sampling rate or at a higher second sampling ratewhich is double the first sampling rate, wherein the encoded audiochannels are all sampled at the second higher rate, and whereinadditional information is provided for each channel indicating whetherthe channel signal was sampled at the first or the second rate.
 40. Anencoded audio data signal provided on a carrier as claimed in claim 39,wherein the additional information further indicates, for those encodedchannels representing channel signals sampled at the first rate, whichdecoded samples correspond to the input signal.
 41. An encodercomprising: inputs for a multichannel digital signal and for a downmixspecification, comprising; and a matrix implemented as a cascade ofprimitive matrix quantisers and furnishing a stream of encodedinformation formatted as a plurality of substreams, the data in thefirst substream being taken from a strict subset of the outputs of thematrix and containing sufficient information for implementation of thedownmix specification; wherein the matrix comprises: a first primitivematrix having terms computed with respect to the specification for afirst downmix channel, such that an output of the first primitive matrixis substantially the first downmix channel multiplied by a scalingfactor; and a second primitive matrix having terms computed such that acoefficient multiplying the output of the first primitive matrix issubstantially zero.
 42. An encoder as claimed in claim 41, wherein thefirst primitive matrix modifies an input channel having substantiallythe largest coefficient in the specification for the first downmixchannel.
 43. An encoder comprising: inputs for a multichannel digitalsignal and for a downmix specification; and a matrix implemented as acascade of primitive matrix quantisers and furnishing a stream ofencoded information formatted as a plurality of substreams, the data inthe first substream being taken from a strict subset of the outputs ofthe matrix and containing sufficient information for implementation ofthe downmix specification, wherein the matrix defining the channelstransmitted in the first substream in terms of the channels of themultichannel signal has rows that are substantially orthogonal to eachother.
 44. An encoder comprising: inputs for a multichannel digitalsignal and for a downmix specification; and a matrix implemented as acascade of primitive matrix quantisers and finishing a stream of encodedinformation formatted as a plurality of substreams, the data in thefirst substream being taken from a strict subset of the outputs of thematrix and containing sufficient information for implementation of thedownmix specification, wherein the cross-correlation between thetransmitted channels of the first substream is substantially zero. 45.An encoder as claimed in claim 44, wherein said cross-correlation isgiven a spectral weighting that emphasises the frequency bands thatcontribute substantially to the transmitted data rate.
 46. An encoder asclaimed in claim 45, wherein said cross-correlation is given a spectralweighting substantially as defined by the digital filter (1−z⁻¹)^(n),where n=1, 2 or
 3. 47. In a lossless encoder comprising two or moreinput channels and transmitting output signals that are linearcombinations of the input channels, a method of determining the outputsignals for transmission, comprising the steps of: (i) establishing afirst list of input channels, and a second list defining output signalsdetermined for transmission; (ii) deleting one channel from the firstlist and choosing a linear combination of the remaining channels in thefirst list and of the output signals determined for transmission, thelinear combination being chosen substantially to minimise an entropymeasure for a difference signal equal to the difference between said onechannel and the linear combination; (iii) applying a scaling factor tothe difference signal to obtain a scaled difference signal; (iv)allocating the scaled difference signal as an output signal fortransmission, and including a definition of that output signal in thesecond list; and (v) repeating steps (ii) to (iv) for a further inputchannel or channels.
 48. A method as claimed in claim 47, wherein thedefinition of the output signal comprises the output signal itself. 49.A method as claimed in claim 47, wherein the definition of the outputsignal comprises matrix specifications enabling the output signal to becalculated.
 50. A method as claimed.in claim 47, wherein the first listis initially equal to the entire set of input channels, and the secondlist is initially empty.
 51. A method as claimed in claim 47, whereinthe second list initially contains signals that allow a downmix to berecovered, and the first list contains a subset of the set of inputchannels.
 52. A method as claimed in claim 47, in which the step ofdeleting one channel comprises selecting a channel for deletion from thefirst list for which the absolute magnitudes of the coefficients in thelinear combination do not exceed a predetermined limit.
 53. A method asclaimed in claim 47, in which the step of deleting one channel comprisesselecting a channel having the smallest energy.
 54. A method as claimedin claim 47, in which said scaling factor is +1 or −1.
 55. A method asclaimed in claim 47, in which said scaling factor is +½ or−½.
 56. Amethod as claimed in claim 47, in which said entropy measure is energy.57. A method as claimed in claim 47, in which said entropy measure isenergy calculated with a spectral weighting that emphasises thefrequency bands that contribute substantially to the data rate of acompressed output stream of the encoder.
 58. A method as claimed inclaim 47, in which said entropy measure is energy calculated with aspectral weighting substantially as defined by the digital filter(1−z⁻¹)^(n), where n=1, 2 or
 3. 59. A method as claimed in claim 47, inwhich calculation of the scaled difference signal is performed by aprimitive matrix quantiser.
 60. A method as claimed in claim 47, inwhich the scaling factor has a magnitude of less than unity, and inwhich additional least significant bits recovered following the scalingoperation are provided as an output signal for transmission.
 61. Amethod of encoding two or more channels to produce output signals fortransmission that are linear combinations of the input channels, themethod comprising: determining the output signals for transmission usingthe method of any one of claims 47 to 60; and calculating the determinedoutput signals.
 62. A method of encoding a multichannel signalcontaining input channels and a downmix specification, comprising thesteps of: choosing a first input channel having substantially thelargest coefficient in the specification of a downmix channel; andscaling down the first input channel using a primitive matrix quantiserin which the coefficient of the first channel is less than unity and thecoefficients of the other input channels are substantially zero.
 63. Amethod as claimed in claim 62, in which additional least significantbits recovered following the scaling operation are provided as an outputsignal for transmission.